-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Fix flaky cache test #6373
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: trunk
Are you sure you want to change the base?
Fix flaky cache test #6373
Conversation
Co-authored-by: josh11b <[email protected]>
| auto stale_runtimes_0_inode = | ||
| stale_runtimes[0].base_dir().Stat()->unix_inode(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removing this will no longer compile.
| EXPECT_FALSE(stale_runtimes_0.base_dir().Stat()->unix_inode() | ||
| == stale_runtimes_0_inode && | ||
| stale_runtimes_0.base_dir().Stat()->mtime() | ||
| == stale_runtimes_0_mtime); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[diff] reported by reviewdog 🐶
| EXPECT_FALSE(stale_runtimes_0.base_dir().Stat()->unix_inode() | |
| == stale_runtimes_0_inode && | |
| stale_runtimes_0.base_dir().Stat()->mtime() | |
| == stale_runtimes_0_mtime); | |
| EXPECT_FALSE(stale_runtimes_0.base_dir().Stat()->unix_inode() == | |
| stale_runtimes_0_inode && | |
| stale_runtimes_0.base_dir().Stat()->mtime() == | |
| stale_runtimes_0_mtime); |
|
I don't think this is quite the right way to fix the test. Rather than relying on timestamps, we can force the I've sent #6387 which does this, and also makes some other improvements to make it easier to debug if this keeps happening. |
Fixes a flaky test in runtimes_cache_test.cpp that gives a false failure when the filesystem reuses the inode of a stale cache entry.
Closes #6168